Skip to content

final-code#1

Open
avanish511 wants to merge 1 commit into
satishba:masterfrom
avanish511:patch-1
Open

final-code#1
avanish511 wants to merge 1 commit into
satishba:masterfrom
avanish511:patch-1

Conversation

@avanish511

Copy link
Copy Markdown

maybe the final required code :)

@satishba satishba left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work over all. Please address the comments mentioned.

Comment thread assignemntOne.java
// <TO DO: Assign marks to students>
Scanner inputobj=new Scanner(System.in);
for(int i=0;i<8;i++){
eeeStudent1.marks[i]=inputobj.nextInt();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the set marks method instead of direct assignment

Comment thread assignemntOne.java
}
System.out.println("for student 2");
for(int i=0;i<8;i++){
eeeStudent2.marks[i]=inputobj.nextInt();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use set marks method

Comment thread assignemntOne.java
eeeStudent1.setMarks(eeeStudent1.marks);
eeeStudent2.setMarks(eeeStudent2.marks);

int max1= eeeStudent1.maxMarks(eeeStudent1.marks);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should not be any need to pass a parameter for this method

Comment thread assignemntOne.java

int max1= eeeStudent1.maxMarks(eeeStudent1.marks);

int max2= eeeStudent2.maxMarks(eeeStudent2.marks);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, no need for parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants